<?php

/**
 * PaymentChecksInvoice form base class.
 *
 * @package    erp-crm
 * @subpackage form
 * @author     Milwell H. Sia
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BasePaymentChecksInvoiceForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'payment_iden' => new sfWidgetFormInputHidden(),
      'check_iden'   => new sfWidgetFormInputHidden(),
      'invoice_iden' => new sfWidgetFormInputHidden(),
      'amount'       => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'payment_iden' => new sfValidatorPropelChoice(array('model' => 'PaymentChecks', 'column' => 'payment_iden', 'required' => false)),
      'check_iden'   => new sfValidatorPropelChoice(array('model' => 'PaymentChecks', 'column' => 'check_iden', 'required' => false)),
      'invoice_iden' => new sfValidatorPropelChoice(array('model' => 'Invoice', 'column' => 'invoice_iden', 'required' => false)),
      'amount'       => new sfValidatorNumber(),
    ));

    $this->widgetSchema->setNameFormat('payment_checks_invoice[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'PaymentChecksInvoice';
  }


}
